import java.util.Arrays;
public class t2 {
    public static void main(String [] args){
        long startTime = System.currentTimeMillis();
        int[] numes1 =new int[]{2,1,4,7,4,8,3,6,4};
        int[] numes2 =new int[]{10};
        towsum p = new towsum();
        p.sum(numes1 , numes2);
        long endTime = System.currentTimeMillis();
        System.out.println("程序运行时间：" + (endTime - startTime) + "ms"); //输出程序运行时间
    }
}
class towsum{
public static void sum (int [] numes1,int[] numes2) {
    int tmp;
    for (int i = 0; i <= numes1.length - 1; i++) {
        if (i <= (numes1.length - 1) / 2) {
            tmp = numes1[i];
            numes1[i] = numes1[numes1.length - 1 - i];
            numes1[numes1.length - 1 - i] = tmp;
        }
        ;
    }
    int tmp2;
    for (int i = 0; i <= numes2.length - 1; i++) {
        if (i <= (numes2.length - 1) / 2) {
            tmp2 = numes2[i];
            numes2[i] = numes2[numes2.length - 1 - i];
            numes2[numes2.length - 1 - i] = tmp2;
        }
    }
    int b = 0;
    for (int j = numes1.length - 1; j >= 0; j--) {
        int a = numes1[j];
        for (int i = 0; i <= j - 1; i++) {
            a *= 10;
        }
        ;
        b += a;
    }
    //System.out.println(b);
    int d = 0;
    for (int j = numes2.length - 1; j >= 0; j--) {
        int c = numes2[j];
        for (int i = 0; i <= j - 1; i++) {
            c *= 10;
        }
        d += c;
    }
    //System.out.println(d);
    int e;
    int num = 1;
    e = b + d;
    int x = e;
    for (int i = 1; true; i++) {
        if (x / 10 == 0) {
            break;
        } else
            x = x / 10;
        ++num;
    }
    int[] arr = new int[num];
    //System.out.println(e);
    float f = 0.1f;
    int g = 0;
    //f = e/100%10;
//System.out.println(f);
    for (int i = 1; i <= num; i++) {
        f = 0.1f;
        //System.out.println(i);
        for (int j = 1; j <= i; j++) {
            f *= 10;
            g = (int) f;
        }
        //e=807
        //System.out.println(g);
        arr[i - 1] = e / g % 10;
    }
    String str = "";
    for (int i = 0; i <= arr.length - 1; i++) {
        if (i < arr.length - 1) {
            str += arr[i] + ",";
        } else
            str += arr[i];
    }
    System.out.println(Arrays.toString(arr));
}


}
